﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Os.Domain.Equipamento>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	.: Editar Equipamento :.
</asp:Content>

<asp:Content ID="headContent" ContentPlaceHolderID="headContent" runat="server">
    <script type="text/javascript">
        $(function() {
            $("#Data").datepicker({
            changeMonth: true,
            changeYear: true
            });
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Editar</h2>

    <% using (Html.BeginForm()) {%>
        <div class="field-validation-error" ><%= Html.Encode(ViewData["Result"]) %></div>
        
        <fieldset>
            <legend>Preencha os campos abaixo:</legend>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Data) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBox("Data", String.Format("{0:dd/MM/yyyy}", Model.Data)) %>
                <%= Html.ValidationMessageFor(model => model.Data) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Descricao) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Descricao) %>
                <%= Html.ValidationMessageFor(model => model.Descricao) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Marca) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Marca) %>
                <%= Html.ValidationMessageFor(model => model.Marca) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Modelo) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Modelo) %>
                <%= Html.ValidationMessageFor(model => model.Modelo) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.So) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.So) %>
                <%= Html.ValidationMessageFor(model => model.So) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Localizacao) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Localizacao) %>
                <%= Html.ValidationMessageFor(model => model.Localizacao) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Observacao) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Observacao) %>
                <%= Html.ValidationMessageFor(model => model.Observacao) %>
            </div>
            
            <div class="editor-label">
                <%= Html.Label("Cliente") %>
            </div>
            <div class="editor-field">
                <%= Html.LoadCliente(ViewData["Clientes"] as IEnumerable,Model.Cliente,false) %>
            </div>
            
            <p>
                <input type="submit" value="Salvar" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Voltar para Lista", "Index") %>
    </div>

</asp:Content>

